package com.xiamaliu;

import com.xiamaliu.impl.JavaCourse;
import com.xiamaliu.impl.PythonCourse;

public class Test {
    public static void main(String[] args) {
        JavaCourse course = new JavaCourse();
        course.record();

        CourseFactory courseFactory = new CourseFactory();
        courseFactory.create("python").record();

        CourseFactory factory = new CourseFactory();
        factory.createOfClassName("com.xiamaliu.impl.JavaCourse").record();
        factory.createOfType(PythonCourse.class).record();
        factory.createOfGenericsType(JavaCourse.class).record();
    }
}
